<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>普惠电商后台系统</title>
    <link rel="stylesheet" href="css/models.css">
    <!--bootstrap-select  css文件-->
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap-select.css"/>
    <!--富文本  css文件-->
    <!--<link rel="stylesheet" href="css/ueditor.css">-->
    <!--图片点击放大  css文件-->
    <link rel="stylesheet" href="js/viewer/css/viewer.min.css">
</head>
<body>
<div class="MainContent">
    <div class="current">当前位置：<a href="welcome.html" alt="">商品分类 &gt;</a><a href="#" alt="">分类列表 &gt;</a><span>添加分类</span></div>
    <div class="MainCont ">
        <form action="" id="yigeform">
            <div class="mainFrom">
                <label class="left">
                    <span class="require">*</span>
                    <span class="">分类名称:</span>
                </label>
                <input type="text" class="left" placeholder=""/>
            </div>
            <div class="mainFrom">
                <label class="left">
                    <span class="require">*</span>
                    <span class="">分类级别:</span>
                </label>
                <input type="radio" class="Category-1" name="Category" placeholder="" value="一级分类" checked="checked"/>一级分类
                <input type="radio" class="Category-2" name="Category" placeholder="" value="二级分类"/>二级分类
                <input type="radio" class="Category-3" name="Category" placeholder="" value="三级分类"/>三级分类
            </div>
            <div class="mainFrom Category-parent">
                <label class="left">
                    <span class="">上级分类:</span>
                </label>
                <select class="selectUp selectpicker" data-live-search="true">
                    <option value="">全部</option>
                    <option value="">平台</option>
                    <option value="">市代</option>
                </select>
                <select class="selectUp selectpicker level3" data-live-search="true">
                    <option value="">全部</option>
                    <option value="">平台</option>
                    <option value="">市代</option>
                </select>
            </div>
            <div class="mainFrom">
                <label class="left">
                    <span class="">分类排序:</span>
                </label>
                <input type="text" class="left" placeholder="" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"/>
            </div>
            <div class="mainFrom">
                <label class="left">
                    <span class="">图标:</span>
                </label>
                <div class="content-box">
                    <div class="img-box addIndustry">
                        <div class="img-box full">
                            <section class=" img-section">
                                <div class="z_photo upimg-div">
                                    <section class="z_file left">
                                        <img src="images/add.png" class="add-img">
                                        <input type="file" name="file" id="file" class="file" value=""
                                               accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
                                    </section>
                                </div>
                            </section>
                        </div>
                    </div>
                </div>

            </div>
            <div class="mainFrom">
                <label class="left">
                    <span class="">分类描述:</span>
                </label>
                <textarea id="container" name="content" style="margin-left:15px;width: 800px;height: 160px;border: 1px solid #eee;">这里写你的初始化内容</textarea>
            </div>
            <div class="mainFrom">
                <label class="left">
                    <span class="">是否启用:</span>
                </label>
                <input type="radio" name="enable" placeholder="启用" value="启用" checked="checked"/>启用
                <input type="radio" name="enable" placeholder="不启用" value="不启用"/>不启用
            </div>
        </form>
        <div class="PopupBtn btnLeft" style="margin-bottom: 20px;margin-left: 40px">
            <input class="submit addCategories_save " name="" type="button" value="保存">
           <input class="submit addCategories_cancel" name="" type="button" value="取消">

    </div>
    <!--商品规格组结束-->
        <!--规格展示表格-->

    </div>
</div>
<!--遮罩层-->
<div class="maskBox"></div>
<!--确定操作弹窗-->
<div class="PopupBox SaveBox">
    <!--关闭按钮-->
    <a href="javascript: void(0);" class="close"></a>
    <!--end 关闭按钮-->
    <!--内容-->
    <div class="PopupCon">
        <div class="Deter">
            <h2>保存成功</h2>
        </div>
        <div class="PopupBtn">
            <input class="submit Savebox-add" name="" type="button" value="继续添加">
            <a href="type_list.html"><input class="cancel Savebox-cancel" name="" type="button" value="取消"></a>
        </div>
    </div>
    <!--end 内容-->
</div>
<!--确定成功弹窗-->
<div class="PopupBox DeterBox">
    <!--关闭按钮-->
    <a href="javascript: void(0);" class="close"></a>
    <!--end 关闭按钮-->
    <!--内容-->
    <div class="PopupCon">
        <div class="Deter">
            <h2>是否取消操作</h2>
        </div>
        <div class="PopupBtn">
            <a href="type_list.html"><input class="submit operation-yes" name="" type="button" value="是"></a>
            <input class="cancel operation-no" name="" type="button" value="否">
        </div>
    </div>
    <!--end 内容-->
</div>

<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<!--图片上传插件-->
<script type="text/javascript" src="js/imgUp.js"></script>
<!--bootstrap-select-->
<script type="text/javascript" src="js/bootstrapselect/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrapselect/bootstrap-select.js"></script>
<script type="text/javascript" src="js/bootstrapselect/select.js"></script>
<!--属性输入框的增加和删除-->
<script type="text/javascript" src="js/attrbox.js"></script>
<!--图片点击放大-->
<script src="js/viewer/viewer-jquery.min.js"></script>
<script src="js/index.js"></script>

<!--&lt;!&ndash;百度UE插件&ndash;&gt;-->
<!--&lt;!&ndash; 配置文件 &ndash;&gt;-->
<!--<script type="text/javascript" src="js/ueditor/ueditor.config.js"></script>-->
<!--&lt;!&ndash; 编辑器源码文件 &ndash;&gt;-->
<!--<script type="text/javascript" src="js/ueditor/ueditor.all.js"></script>-->
<!--&lt;!&ndash; 实例化编辑器 &ndash;&gt;-->

<!--<script type="text/javascript">-->
<!--var ue = UE.getEditor('container');-->
<!--</script>-->
<!--&lt;!&ndash;百度UE插件&ndash;&gt;-->
<script type="text/javascript">
    $(function() {
        var Popupe = new PopupBase();
        Popupe.show('.addCategories_save','.maskBox,.SaveBox');
        Popupe.show('.addCategories_cancel', '.maskBox,.DeterBox');
        Popupe.hide('.close', '.maskBox,.DeterBox,SaveBox');
        Popupe.hide('.Savebox-add', '.maskBox,.SaveBox');
        Popupe.hide('.operation-no','.maskBox,.DeterBox');
        //页面清空操作
        var ckk='';//保存分类级别勾选项
        var s1='';//保存二级分类上级
        var s2='';//保存三级分类上级
        ckk=$('input[name="Category"]:checked').attr('class');
        $('input[name="Category"]').click(function () {
            ckk=$('input[name="Category"]:checked').attr('class');

        })
        $('select.selectUp').change(function () {
            s1=$('span.filter-option').eq(0).text();
            s2=$('span.filter-option').eq(1).text();
        })
        $('.Savebox-add').click(function () {
            $('#yigeform')[0].reset();
            $('.up-section').remove();
            $('input.'+ckk+'').prop('checked',true);
            $('input[name="enable"]').eq(0).prop('checked',true);
        })

        $('.addCategories_cancel').click(function () {
            $('#main_frame').prop('src','type_list.html');
        })
        $('.addCategories_cancel').click(function () {
            $('#main_frame').attr('src','type_list.html');
        });
        var value=$('#file').attr('value');
        $("#file" + value).takungaeImgup({
            formData: {
                'module': 'classify',
//                'name':'example',
                'filesname':'urlfile'
            },
            url: 'http://192.168.32.65:7000/web/attachment/upload',
            maxImage:3,
            success: function(data) {
                alert(data);
            },
            error: function(err) {
                alert(err);
            }
        });

    });
</script>
</body>
</html>